<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Auu Small Wiki</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="/static/css/bootstrap.css" rel="stylesheet">
    <link href="/static/css/messenger.css" rel="stylesheet">
    <link href="/static/css/messenger-theme-future.css" rel="stylesheet">
    <link href="/static/css/bootstrap-responsive.min.css" rel="stylesheet">    
    <link rel="stylesheet" type="text/css" href="/static/css/theme.css">
    <link rel="stylesheet" href="/static/css/font-awesome.css">

    <script src="/static/js/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="/static/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="/static/js/backbone-min.js" type="text/javascript"></script>
    <script src="/static/js//messenger.min.js" type="text/javascript"></script>


</script> 
    <style type="text/css">
        #line-chart {
            height:300px;
            width:800px;
            margin: 0px auto;
            margin-top: 1em;
        }
        .brand { font-family: georgia, serif; }
        .brand .first {
            color: #ccc;
            font-style: italic;
        }
        .brand .second {
            color: #fff;
            font-weight: bold;
        }
    </style>
    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="../assets/ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="/static/ico/apple-touch-icon-57-precomposed.png">
  </head>

  <!--[if lt IE 7 ]> <body class="ie ie6"> <![endif]-->
  <!--[if IE 7 ]> <body class="ie ie7 "> <![endif]-->
  <!--[if IE 8 ]> <body class="ie ie8 "> <![endif]-->
  <!--[if IE 9 ]> <body class="ie ie9 "> <![endif]-->
  <!--[if (gt IE 9)|!(IE)]><!--> 
  <body class=""> 
  <!--<![endif]-->
    
    <!-- header -->
<div class="navbar">
    <div class="navbar-inner">
            <ul class="nav pull-right">
                
                <li><a href="/userctr/userlist" class="hidden-phone visible-tablet visible-desktop" role="button"><i class="icon-wrench"></i> 设置</a></li>
                <li id="fat-menu" class="dropdown">
                    <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="icon-user"></i> {{.username}}
                        <i class="icon-caret-down"></i>
                    </a>

                    <ul class="dropdown-menu">
                        <li><a tabindex="-1" href="#changePassword" data-toggle="modal">修改密码</a></li>
                        <li class="divider"></li>
                        <li><a tabindex="-1" class="visible-phone" href="/userctr/userlist">设置</a></li>
                        <li class="divider visible-phone"></li>
                        <li><a tabindex="-1" href="/login?todo=logout">安全退出</a></li>
                    </ul>
                </li>
                
            </ul>
            <a class="brand" href="/"><span class="first">Auu</span> <span class="second">Small Wiki</span></a>
    </div>
</div>
    <!-- lefter -->
<div class="sidebar-nav" style="border-top-width: 6px;border-top-style: solid;border-top-color: #1D1D1D;">
        <a href="#dashboard-menu" class="nav-header" data-toggle="collapse"><i class="icon-dashboard"></i>功能列表</a>
        <ul id="dashboard-menu" class="nav nav-list collapse in">
            <li ><a href="/edit/?wiki={{.edittitle}}">编辑Wiki页</a></li>           
        </ul>
        <a href="#dashboard-menu2" class="nav-header" data-toggle="collapse"><i class="icon-dashboard"></i>浏览记录</a>
        <ul id="dashboard-menu2" class="nav nav-list collapse in">
            {{.mylist}}           
        </ul>
    </div>

			{{.LayoutContent}}

<!-- Modal -->
<script type="text/javascript"> 

   function perSubmit2() {
        //$.globalMessenger().post "Your request has succeded!";
        var d=$("#formcp").serialize();
        $.post("/userctr/cp", d, function (result) { 
            $('#changePassword').modal('hide');
            alert(result);
        }, "text");
    }

</script> 
<div id="changePassword" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">修改密码</h3>
  </div>
  <div class="modal-body">
    <form class="form-horizontal" id="formcp" name="formcp">
      <div class="control-group">
        <label class="control-label" for="oldpassword">旧密码</label>
        <div class="controls">
          <input type="password" id="oldpassword" name="oldpassword" placeholder="旧密码">
        </div>
      </div>
            <div class="control-group">
        <label class="control-label" for="newpassword">新密码</label>
        <div class="controls">
          <input type="password" id="newpassword" name="newpassword" placeholder="新密码">
        </div>
      </div>
            <div class="control-group">
        <label class="control-label" for="newpassword2">新密码确认</label>
        <div class="controls">
          <input type="password" id="newpassword2" name="newpassword2" placeholder="新密码确认">
        </div>
      </div>
    </form>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
    <button class="btn btn-primary" id="submitbtn" onclick="perSubmit2()">提交</button>
  </div>
</div>

<footer>
    <hr>
    <p class="pull-right">Design by <a href="http://www.jinlanmeng.cn" target="_blank">Auu</a></p>
    <p>&copy; 2013 <a href="http://www.jinlanmeng.cn" target="_blank">金蓝盟</a></p>
</footer>                   
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function() {
            $('.demo-cancel-click').click(function(){return false;});
        });
    </script>
    
  </body>
</html>